﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Hangjing.SQLServerDAL;
using Hangjing.Model;
using Hangjing.Common;


namespace Html5
{
    public partial class m_recharge_shop : shopPageBase
    {

        Points dal = new Points();
        protected void Page_Load(object sender, EventArgs e)
        {

            PointsInfo user = UserHelp.GetUser_Togo();
            user = new Points().GetModel(user.Unid);
            UserHelp.SetLogin_Togo(user);
            lbusermoney.InnerText = user.money.ToString();


            if (Request.HttpMethod.ToUpper() == "POST")
            {
                add_Click();
            }

           WebUtility.BindRepeater(rptordersouce, CacheHelper.GetOrderSourceList());
        }

        /// <summary>
        /// 提交修改密码信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void add_Click()
        {
            string rid = WebUtility.InputText(Request.Form["ddlpaymode"]);

            PointsInfo user = UserHelp.GetUser_Togo();
            string orderid = "";
            string tnum = user.Unid.ToString("00000");
            orderid = "s" + tnum + DateTime.Now.ToString("yyMMddHHmmss");

   
            string url = "/wxpay.aspx?orderid=" + orderid + "&showwxpaytitle=1&cityid="+user.cityid;
            url += "&price=0&rid=" + rid;
            url = "/weixinpay/" + url;

            Response.Redirect(url);

        }
    }
}

